package cn.leaf.adapter;

/**
*
 * description: SD card adapter TF card
 *
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-07-18 00:55:30
 *
*/
public class SdAdapterTf implements SdCard {

    /**
     * tf卡
     */
    private final TfCard tfCard;

    public SdAdapterTf(TfCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String read() {
        return tfCard.read();
    }

    @Override
    public int write(String msg) {
        System.out.println("写数据");
        return tfCard.write(msg);
    }
}
